#ifndef _OBLBasicTable_H_
#define _OBLBasicTable_H_

#include "sthread.h"

static const int NO_PHILOSOPHER = -1; 

typedef struct ChopsticksS{
  int* sticks; // a dynamic array to keep track of used chopsticks
  int length;  // length of the array
} chopsticks;

typedef struct OBLBasicTableS{
  /*
    * Your code here
    */
  chopsticks chopsticks;
  scond_t    cond;       // we need a condition variable here
  smutex_t   mutex;      // note neither of these are pointers....
} OBLBasicTable;

void OBLT_init(OBLBasicTable *t, int nPlates);
void OBLT_startEating(OBLBasicTable *t, int philosopher);
void OBLT_doneEating(OBLBasicTable *t, int philosopher);

#endif
